{% if isFramework("vue") %}
Any valid Vue component can be a tool panel component, however it is also possible to implement the following optional methods:
{% /if %}

{% if isFramework("vue") %}
```ts
interface IToolPanel {
   // Called when `api.refreshToolPanel()` is called (with the current params).
   // Also called when the `sideBar` grid option is updated (with the updated params).
   // When `sideBar` is updated, if this method returns `true`,
   // then the grid will take no further action.
   // Otherwise, the tool panel will be destroyed and recreated.
   refresh(params: IToolPanelParams): boolean | void;

   // If saving and restoring state, this should return the current state
   getState(): any;
}
```
{% /if %}

{% if isFramework("vue") %}
When a custom tool panel component is instantiated then the following will be made available on `this.params`:
{% /if %}
